f0f3f3800510bb9fe496b2b9cca9673753ca5b61,miso-web/src/main/java/uk/ac/bbsrc/tgac/miso/webapp/controller/EditUserController.java,EditUserController,processSubmit,#User#ModelMap#SessionStatus#HttpServletRequest#,229
Before Change
if (!isStringEmptyOrNull(request.getParameter("password")) && !isStringEmptyOrNull(request.getParameter("newpassword"))) {
if (!isStringEmptyOrNull(request.getParameter("confirmpassword"))) {
if (request.getParameter("newpassword").equals(request.getParameter("confirmpassword"))) {
if (!isStringEmptyOrNull(request.getParameter("newpassword"))
&& !isStringEmptyOrNull(request.getParameter("confirmpassword"))) {
if (SecurityContextHolder.getContext().getAuthentication().getName().equals(user.getLoginName())) {
if (passwordCodecService.getEncoder().isPasswordValid(user.getPassword(), request.getParameter("password"), null)) {
log.debug("User '" + user.getLoginName() + "' attempting own password change");
After Change
throws IOException {
try {
if (!isStringEmptyOrNull(request.getParameter("password")) && !isStringEmptyOrNull(request.getParameter("newpassword"))) {
if (!securityManager.isPasswordMutable()) {
throw new IOException("Cannot change password in MISO directly. Please change your password as directed by your IT department.");
}
if (isStringEmptyOrNull(request.getParameter("confirmpassword"))) {
throw new IOException("You must supply a confirmation of your new password.");
}
if (isStringEmptyOrNull(request.getParameter("newpassword"))
|| isStringEmptyOrNull(request.getParameter("confirmpassword"))) {
throw new IOException("New password cannot be empty");
}
if (!request.getParameter("newpassword").equals(request.getParameter("confirmpassword"))) {